package cn.tedu.zx.pojo.court.dto;



import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;


@Data
@TableName("category")
@Accessors(chain = true)
public class CategoryAddNewDto implements Serializable {

    @NotNull(message = "添加分类失败，分类名称为必填项")
    @ApiModelProperty(value = "分类名称",required = true,example = "微信")
    private String name;

    @NotNull
    @Range(min = 0,message = "请输入自然数")
    @ApiModelProperty(value = "父级id",required = true,example = "0")
    private Long parentId;

    @NotNull
    @Range(min = 0,max = 1,message = "请输入0或1")
    @ApiModelProperty(value = "是否为父级",required = true,example = "0")
    private Integer isParent;

    @NotNull
    @Range(min = 0,message = "请输入自然数")
    @ApiModelProperty(value = "分级深度",required = true,example = "0")
    private Integer depth;

    @NotNull
    @Range(min = 1,max = 100,message = "请输入1-100之间的数字")
    @ApiModelProperty(value = "相册序号",required = true,example = "56")
    private Integer sort;

}
